package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ByIndustrialChainMapper;
import com.ruoyi.system.domain.ByIndustrialChain;
import com.ruoyi.system.service.IByIndustrialChainService;

/**
 * 产业链和产业集群Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-12
 */
@Service
public class ByIndustrialChainServiceImpl implements IByIndustrialChainService 
{
    @Autowired
    private ByIndustrialChainMapper byIndustrialChainMapper;

    /**
     * 查询产业链和产业集群
     * 
     * @param id 产业链和产业集群主键
     * @return 产业链和产业集群
     */
    @Override
    public ByIndustrialChain selectByIndustrialChainById(Long id)
    {
        return byIndustrialChainMapper.selectByIndustrialChainById(id);
    }

    /**
     * 查询产业链和产业集群列表
     * 
     * @param byIndustrialChain 产业链和产业集群
     * @return 产业链和产业集群
     */
    @Override
    public List<ByIndustrialChain> selectByIndustrialChainList(ByIndustrialChain byIndustrialChain)
    {
        return byIndustrialChainMapper.selectByIndustrialChainList(byIndustrialChain);
    }

    /**
     * 新增产业链和产业集群
     * 
     * @param byIndustrialChain 产业链和产业集群
     * @return 结果
     */
    @Override
    public int insertByIndustrialChain(ByIndustrialChain byIndustrialChain)
    {
        byIndustrialChain.setCreateTime(DateUtils.getNowDate());
        return byIndustrialChainMapper.insertByIndustrialChain(byIndustrialChain);
    }

    /**
     * 修改产业链和产业集群
     * 
     * @param byIndustrialChain 产业链和产业集群
     * @return 结果
     */
    @Override
    public int updateByIndustrialChain(ByIndustrialChain byIndustrialChain)
    {
        return byIndustrialChainMapper.updateByIndustrialChain(byIndustrialChain);
    }

    /**
     * 批量删除产业链和产业集群
     * 
     * @param ids 需要删除的产业链和产业集群主键
     * @return 结果
     */
    @Override
    public int deleteByIndustrialChainByIds(Long[] ids)
    {
        return byIndustrialChainMapper.deleteByIndustrialChainByIds(ids);
    }

    /**
     * 删除产业链和产业集群信息
     * 
     * @param id 产业链和产业集群主键
     * @return 结果
     */
    @Override
    public int deleteByIndustrialChainById(Long id)
    {
        return byIndustrialChainMapper.deleteByIndustrialChainById(id);
    }
}
